package com.linjing.demo.message.mq;

import org.apache.rocketmq.client.exception.MQClientException;

/**
 * @name: MQTest
 * @Author: wangshimin
 * @Date: 2019/10/31  15:14
 * @Description:
 */
public class MQProducerTest {
    public static void main(String[] args) throws MQClientException {
        MQProducer mqProducer=new MQProducer();
        mqProducer.init();
        boolean asyncReduceStock = mqProducer.asyncReduceStock(1, 2220);
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>");
        if(asyncReduceStock){
            System.out.println("处理成功");
        }else {
            System.out.println("处理失败");
        }
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>");
    }
}
